<!DOCTYPE html>
<html>
<head>
<title>登录与安全设置</title>
<jsp:include page="../../include/header.jsp" />
<script type="text/javascript">
	$( document ).ready(function() {
		base.config.initSecuritySetting();
	});
</script>
</head>
<body class="smartao">
<form id="securityConfigForm" class="form-horizontal" action="base/config/security-config!save.action" method="post">
	<div class="alert hide">
		<i class="icon-info-sign icon-large"></i>
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		<span></span>
	</div>
	<div class="breadcrumb">
		<span><i class="icon-cog"></i>登录与安全设置</span>
	</div>
	<div>
		<div class="control-group">
			<label class="control-label">登录设置</label>
			<div class="controls">
				<label class="checkbox inline">
					<input type="checkbox" name="login.enableCaptcha" value="true" fieldValue="${login.enableCaptcha}" />
					启用验证码
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="login.enableSSO" value="true" fieldValue="${login.enableSSO}" />
					启用单点登录
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="login.enableRemember" value="true" fieldValue="${login.enableRemember}" />
					启用记住密码
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="login.enableUSB" value="true" fieldValue="${login.enableRemember}" />
					启用USB Key
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="login.enableDynamicpass" value="true" fieldValue="${login.enableRemember}" />
					启用动态密码
				</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">登录认证</label>
			<div class="controls providers">
				<input type="hidden" id="providers" name="login.providers" value="${login.providers}">
				<label class="checkbox inline">
					<input type="checkbox" class="provider" id="dao" name="dao" value="DaoAuthenticationProvider">
					数据库认证
				</label>
				<label class="checkbox inline">
					<input type="checkbox" class="provider" id="sso" name="sso" value="SSOAuthenticationProvider">
					SSO 认证
				</label>
				<label class="checkbox inline">
					<input type="checkbox" class="provider" id="rememberme" name="rememberme" value="RememberMeAuthenticationProvider">
					Cookie认证
				</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">最大并发登录数</label>
			<div class="controls">
				<input type="text" size="4" name="login.maximumSessions" value="${login.maximumSessions}" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">并发登录策略</label>
			<div class="controls">
				<label class="radio inline">
					<input type="radio" name="login.maximumException" value="true"  fieldValue="${login.maximumException}" />
					不允许登录
				</label>
				<label class="radio inline">
					<input type="radio" name="login.maximumException" value="false" fieldValue="${login.maximumException}" />
					踢掉前一个用户
				</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">密码最短长度</label>
			<div class="controls">
				<input type="text" size="2" name="password.minLength" value="${password.minLength}" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">密码最大长度</label>
			<div class="controls">
				<input type="text" size="2" name="password.maxLength" value="${password.maxLength}" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">密码寿命</label>
			<div class="controls">
				<input type="text" size="2" name="password.age" value="${password.age}" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">密码复杂度</label>
			<div class="controls">
				<label class="checkbox inline">
					<input type="checkbox" name="password.uppercaseRequired" value="true"  fieldValue="${password.uppercaseRequired}" />
					大写字母(A-Z)
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="password.lowercaseRequired" value="true"  fieldValue="${password.lowercaseRequired}" />
					小写字母(a-z)
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="password.digitRequired" value="true"  fieldValue="${password.digitRequired}" />
					数字(0-9)
				</label>
				<label class="checkbox inline">
					<input type="checkbox" name="password.nonAlphanumericRequired" value="true"  fieldValue="${password.nonAlphanumericRequired}" />
					特殊字符
				</label>
			</div>
		</div>
	</div>
	<div class="form-actions form-action-no-bg">
	    <button class="btn btn-success btn-small" type="submit">保存</button>
	</div>
</form>
</body>
</html>